package com.onyx.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单表
 * @TableName order
 */
public class Order implements Serializable {
    /**
     * 
     */
    private Long id;

    /**
     * 创建用户id
     */
    private Long userId;

    /**
     * 客户id
     */
    private Long customerId;

    /**
     * 创建日期
     */
    private Date createDate;

    /**
     * 总金额
     */
    private BigDecimal totalMoney;

    /**
     * 已经支付的钱数
     */
    private BigDecimal alreadyPay;

    /**
     * 下次的支付时间
     */
    private Date nextPayTime;

    /**
     * 回扣
     */
    private BigDecimal discount;

    /**
     * 0未发货   1发货了部分产品   2全部发货完成
     */
    private Integer productState;

    /**
     * 订单支付状态: 0未支付   1 支付部分   2支付完成
     */
    private Integer payState;

    /**
     * 发货时间
     */
    private Date sendTime;

    /**
     * 地址
     */
    private String sendAddress;

    /**
     * 运费
     */
    private BigDecimal sendPrice;

    /**
     * 发货方式
     */
    private String sendWay;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 创建用户id
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * 创建用户id
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     * 客户id
     */
    public Long getCustomerId() {
        return customerId;
    }

    /**
     * 客户id
     */
    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    /**
     * 创建日期
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     * 创建日期
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * 总金额
     */
    public BigDecimal getTotalMoney() {
        return totalMoney;
    }

    /**
     * 总金额
     */
    public void setTotalMoney(BigDecimal totalMoney) {
        this.totalMoney = totalMoney;
    }

    /**
     * 已经支付的钱数
     */
    public BigDecimal getAlreadyPay() {
        return alreadyPay;
    }

    /**
     * 已经支付的钱数
     */
    public void setAlreadyPay(BigDecimal alreadyPay) {
        this.alreadyPay = alreadyPay;
    }

    /**
     * 下次的支付时间
     */
    public Date getNextPayTime() {
        return nextPayTime;
    }

    /**
     * 下次的支付时间
     */
    public void setNextPayTime(Date nextPayTime) {
        this.nextPayTime = nextPayTime;
    }

    /**
     * 回扣
     */
    public BigDecimal getDiscount() {
        return discount;
    }

    /**
     * 回扣
     */
    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    /**
     * 0未发货   1发货了部分产品   2全部发货完成
     */
    public Integer getProductState() {
        return productState;
    }

    /**
     * 0未发货   1发货了部分产品   2全部发货完成
     */
    public void setProductState(Integer productState) {
        this.productState = productState;
    }

    /**
     * 订单支付状态: 0未支付   1 支付部分   2支付完成
     */
    public Integer getPayState() {
        return payState;
    }

    /**
     * 订单支付状态: 0未支付   1 支付部分   2支付完成
     */
    public void setPayState(Integer payState) {
        this.payState = payState;
    }

    /**
     * 发货时间
     */
    public Date getSendTime() {
        return sendTime;
    }

    /**
     * 发货时间
     */
    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    /**
     * 地址
     */
    public String getSendAddress() {
        return sendAddress;
    }

    /**
     * 地址
     */
    public void setSendAddress(String sendAddress) {
        this.sendAddress = sendAddress;
    }

    /**
     * 运费
     */
    public BigDecimal getSendPrice() {
        return sendPrice;
    }

    /**
     * 运费
     */
    public void setSendPrice(BigDecimal sendPrice) {
        this.sendPrice = sendPrice;
    }

    /**
     * 发货方式
     */
    public String getSendWay() {
        return sendWay;
    }

    /**
     * 发货方式
     */
    public void setSendWay(String sendWay) {
        this.sendWay = sendWay;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Order other = (Order) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getTotalMoney() == null ? other.getTotalMoney() == null : this.getTotalMoney().equals(other.getTotalMoney()))
            && (this.getAlreadyPay() == null ? other.getAlreadyPay() == null : this.getAlreadyPay().equals(other.getAlreadyPay()))
            && (this.getNextPayTime() == null ? other.getNextPayTime() == null : this.getNextPayTime().equals(other.getNextPayTime()))
            && (this.getDiscount() == null ? other.getDiscount() == null : this.getDiscount().equals(other.getDiscount()))
            && (this.getProductState() == null ? other.getProductState() == null : this.getProductState().equals(other.getProductState()))
            && (this.getPayState() == null ? other.getPayState() == null : this.getPayState().equals(other.getPayState()))
            && (this.getSendTime() == null ? other.getSendTime() == null : this.getSendTime().equals(other.getSendTime()))
            && (this.getSendAddress() == null ? other.getSendAddress() == null : this.getSendAddress().equals(other.getSendAddress()))
            && (this.getSendPrice() == null ? other.getSendPrice() == null : this.getSendPrice().equals(other.getSendPrice()))
            && (this.getSendWay() == null ? other.getSendWay() == null : this.getSendWay().equals(other.getSendWay()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getTotalMoney() == null) ? 0 : getTotalMoney().hashCode());
        result = prime * result + ((getAlreadyPay() == null) ? 0 : getAlreadyPay().hashCode());
        result = prime * result + ((getNextPayTime() == null) ? 0 : getNextPayTime().hashCode());
        result = prime * result + ((getDiscount() == null) ? 0 : getDiscount().hashCode());
        result = prime * result + ((getProductState() == null) ? 0 : getProductState().hashCode());
        result = prime * result + ((getPayState() == null) ? 0 : getPayState().hashCode());
        result = prime * result + ((getSendTime() == null) ? 0 : getSendTime().hashCode());
        result = prime * result + ((getSendAddress() == null) ? 0 : getSendAddress().hashCode());
        result = prime * result + ((getSendPrice() == null) ? 0 : getSendPrice().hashCode());
        result = prime * result + ((getSendWay() == null) ? 0 : getSendWay().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", customerId=").append(customerId);
        sb.append(", createDate=").append(createDate);
        sb.append(", totalMoney=").append(totalMoney);
        sb.append(", alreadyPay=").append(alreadyPay);
        sb.append(", nextPayTime=").append(nextPayTime);
        sb.append(", discount=").append(discount);
        sb.append(", productState=").append(productState);
        sb.append(", payState=").append(payState);
        sb.append(", sendTime=").append(sendTime);
        sb.append(", sendAddress=").append(sendAddress);
        sb.append(", sendPrice=").append(sendPrice);
        sb.append(", sendWay=").append(sendWay);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}